﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FriendlyURL.Web.Domain.Impl
{
    public static class GlobalProperties
    {

        static string _webServerEnvironmentCacheName = "WebServerEnvironmentCacheName";
        /// <summary>
        /// Returns the name that references the Web Server Environment within the appliation cache
        /// </summary>
        public static string WebServerEnvironmentCacheName
        {
            get { return _webServerEnvironmentCacheName; }
        }

        #region Caching

        static int _defaultCacheDurationDays = 1;
        public static int DEFAULT_CACHE_DURATION_DAYS
        {
            get { return _defaultCacheDurationDays; }
        }

        static int _defaultCacheDurationHours = 0;
        public static int DEFAULT_CACHE_DURATION_HOURS
        {
            get { return _defaultCacheDurationHours; }
        }

        static int _defaultCacheDurationMinutes = 0;
        public static int DEFAULT_CACHE_DURATION_MINUTES
        {
            get { return _defaultCacheDurationMinutes; }
        }

        static int _defaultCacheDurationSeconds = 0;
        public static int DEFAULT_CACHE_DURATION_SECONDS
        {
            get { return _defaultCacheDurationSeconds; }
        }

        #endregion

        #region Cookies

        static string _applicationCookieName = "applicationCookie";
        /// <summary>
        /// 
        /// </summary>
        public static string APPLICATION_COOKIE_NAME
        {
            get { return _applicationCookieName; }
        }

        #endregion

        #region Logging

        static bool _enableAllLogging;
        /// <summary>
        /// Used to toggle "all" logging on and off
        /// <remarks>
        /// This toggle will not stop the "Error" and "Critical" logging.  It is used as more of a "Debug" toggle for all other messages.
        /// </remarks>
        /// </summary>
        public static bool EnableAllLogging
        {
            get { return _enableAllLogging; }
            set { _enableAllLogging = value; }
        }

        static string _logInfoName = "Information";
        /// <summary>
        /// Returns the name that references the Information log type.
        /// </summary>
        public static string LogInfoName
        {
            get { return _logInfoName; }
        }

        static string _logCriticalName = "Critical";
        /// <summary>
        /// Returns the name that references the Critical log type.
        /// </summary>
        public static string LogCriticalName
        {
            get { return _logCriticalName; }
        }

        static string _logWarningName = "Warning";
        /// <summary>
        /// Returns the name that references the Warning log type.
        /// </summary>
        public static string LogWarningName
        {
            get { return _logWarningName; }
        }

        static string _logDebugName = "Debug";
        /// <summary>
        /// Returns the name that references the Debug log type.
        /// </summary>
        public static string LogDebugName
        {
            get { return _logDebugName; }
        }

        static string _logErrorName = "Error";
        /// <summary>
        /// Returns the name that references the Error log type.
        /// </summary>
        public static string LogErrorName
        {
            get { return _logErrorName; }
        }

        #endregion

        #region WebContext

        static string _userCleanNetworkID = "CleanNetworkID";
        /// <summary>
        /// Returns the a constant value for the name of the CleanNetworkID key in a user's session object
        /// </summary>
        public static string USER_CLEAN_NETWORKID
        {
            get { return _userCleanNetworkID; }
        }

        static string _userExists = "UserExists";
        /// <summary>
        /// Returns the a constant value for the name of the UserExists key in a user's session object
        /// </summary>
        public static string USER_EXISTS
        {
            get { return _userExists; }
        }

        static string _userRoles = "UserRoles";
        /// <summary>
        /// Returns the a constant value for the name of the UserRoles key in a user's session object
        /// </summary>
        public static string USER_ROLES
        {
            get { return _userRoles; }
        }


        #endregion

        static string _constantYes = "Y";
        /// <summary>
        /// Returns the a constant value for yes
        /// </summary>
        public static string CONST_YES_VALUE
        {
            get { return _constantYes; }
        }

        static string _constantNo = "N";
        /// <summary>
        /// Returns the a constant value for no
        /// </summary>
        public static string CONST_NO_VALUE
        {
            get { return _constantNo; }
        }
    }

}
